Bounding volume hierarchy

A bounding volume hierarchy (BVH) is a tree structure on a set of geometric objects. All geometric objects are wrapped in bounding volumes that form the leaf nodes of the tree. These nodes are then grouped as small sets and enclosed within larger bounding volumes. These, in turn, are also grouped and enclosed within other larger bounding volumes in a recursive fashion, eventually resulting in a tree structure with a single bounding volume at the top of the tree.

Although wrapping objects in bounding volumes and performing collision tests on them before testing the object geometry itself simplifies the tests and can result in significant performance improvements, the same number of pairwise tests between bounding volumes are still being performed. By arranging the bounding volumes into a bounding volume hierarchy, the time complexity can be reduced to logarithmic in the number of tests performed. With such a hierarchy in place, during collision testing, children do not have to be examined if their parent volumes are not intersected.

Contents

BVH design issues

The choice of bounding volume is determined by a trade-off between two objectives. On the one hand, we would like to use bounding volumes that have a very simple shape. Thus, we need only a few bytes to store them, and intersection tests and distance computations are simple and fast. On the other hand, we would like to have bounding volumes that fit the corresponding data objects very tightly. One of the most commonly used bounding volumes is an axis-aligned minimum bounding box. The axis-aligned minimum bounding box for a given set of data objects is easy to compute, needs only few bytes of storage, and robust intersection tests are easy to implement and extremely fast.

There are several desired properties for a BVH that should be taken into consideration when designing one for a specific application[1]:

In terms of the structure of BVH, we have to decide what degree (the number of children) and height to use in the tree representing the BVH. A tree of a higher degree will be of smaller height, minimizing root-to-leaf traversal time. In addition, the larger the degree, the fewer internal nodes are needed to form the tree. But at the same time, more work has to be expended at each visited node to check its children for overlap. The opposite holds for a low-degree tree: although the tree will be of greater height, less work is spent at each node. Looking at actual usage, it appears binary trees (degree = 2) are by far the most common hierarchical representation. An important reason is that binary trees are easier to build and, to some extent, to represent and traverse than other trees.

BVH construction

There are three primary categories of tree construction methods: top-down, bottom-up, and insertion methods. Top-down methods proceed by partitioning the input set into two (or more) subsets, bounding them in the chosen bounding volume, then keep partitioning (and bounding) recursively until each subset consists of only a single primitive (leaf nodes are reached). Top-down methods are easy to implement, fast to construct and by far the most popular, but do not result in the best possible trees in general. Bottom-up methods start with the input set as the leaves of the tree and then group two (or more) of them to form a new (internal) node, proceed in the same manner until everything has been grouped under a single node (the root of the tree). Bottom-up methods are more difficult to implement, but likely to produce better trees in general. Both top-down and bottom-up methods are considered off-line methods as they both require all primitives to be available before construction starts. Insertion methods build the tree by inserting one object at a time, starting from an empty tree. The insertion location should be chosen that causes the tree to grow as little as possible according to a cost metric. Insertion methods are considered on-line methods since they do not require all primitives to be available before construction starts and thus allow updates to be performed at runtime.

See also

References

  1. ^ Christer Ericson, Real-Time Collision Detection, Page 236–237

External links